package com.example.hotelsystem.service;

import com.example.hotelsystem.entity.Hotelorder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.hotelsystem.result.Result;
import com.example.hotelsystem.vo.order.OrderSearchVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Lee
 * @since 2020-10-20
 */
public interface HotelorderService extends IService<Hotelorder> {
    /*
    生成订单
     */
    public Result createOrder(Long roomId, Long userId, Date checkinTime, Date checkoutTime);


    /*
    展示所有订单
     */
    public Result orderAllList(Integer currentPage);

    /*
    支付订单
     */
    public String orderPay(HttpServletResponse response, Long id);



    public Result searchOrder(OrderSearchVO orderSearchVO);


    /*
    支付成功后跳转接口，改变房间和订单状态
     */
    public Result paySuccess(HttpServletRequest request);


    /*
    查询某个用户的订单列表
     */
    public Result userOrders(Integer currentPage,Long userId,Long orderStatus);


    /*
    修改订单信息
     */
    public Result ModifyOrder(Hotelorder hotelorder);


}
